Numerical control device

ABSTRACT

The present invention relates to a novel numerical control device which enables failures to be diagnosed even when a failure develops in a main processor for executing numerical control as well as failure diagnosis in hardware and the like. The invention includes a bus switching circuit provided in a main bus of an NC device. The NC device also includes a main processor for carrying out numerical control, a main memory, a tape reader, a numerical control panel and position control circuits. Further provided are a service processor for carrying out failure diagnosis and a service memory. When a failure develops in the main processor, the service processor immediately halts the execution of instructions by the main processor, the service processor is then connected to the main bus by the switching action of the bus switching circuit, and the service processor executes failure diagnosis by means of a diagnostic program for diagnosing failures, which program has been previously written into the service memory.

DESCRIPTION BACKGROUND OF THE INVENTION

This invention relates to a numerical control device which, in additionto a main processor which executes data processing for numericalcontrol, is equipped with a separate service processor for systemdiagnosis.

A numerical control device (referred to as an NC device hereinafter)generally is provided with various diagnostic functions for precludingand detecting malfunctions due to hardware failures or the like, and isconstructed so that diagnosis of, for example, an NC control panelabnormality or hardware failure, can be executed on-line and off-line.Conventionally, however, such diagnosis is performed by having the mainprocessor, which carries out the data processing for numerical control,execute a diagnostic program which has been stored in the main memory.This has a disadvantage in that it becomes impossible to carry out themalfunction diagnosis when the main processor fails.

SUMMARY OF THE INVENTION

The present invention seeks to improve upon the disadvantagesencountered in the prior art. The object of the present invention is tomake diagnosis possible even in the event of, for example, a failure inthe main processor, by providing a service processor for systemdiagnosis that is separate from the main processor which executes thedata processing for numerical control, and by arranging it so thatsystem diagnosis can be carried out independently of the main processor.

Specifically, in the present invention a main bus of an NC device isprovided with a switching circuit, which NC device includes, connectedto the switching circuit, a main processor for carrying out numericalcontrol and for diagnosing failures in hardware and the like, and a mainmemory into which the diagnostic program for the main processor iswritten in addition to the program for numerical control. Also includedare a tape reader, an NC control panel, a position control circuit andthe like, and a service processor for diagnosing failures all connectedto the switching circuit. The service processor for failure diagnosishas, with respect to the peripheral circuitry connected to the main busof the main processor, a control capacity substantially equivalent tothat of the main processor, and additionally possesses a function whichstops the main processor from executing an instruction. Furthermore, theservice processor is provided with a service memory into which thediagnostic program for the service processor is written. If for somereason an abnormality should develop in the main processor and make itimpossible for the main processor to execute a failure diagnosisoperation, the service processor is connected to the main bus by meansof the bus switching circuit and the execution of instructions by themain processor is halted, whereupon the service processor diagnosesfailures in the NC device through a method which is the same as thatfollowed by the main processor.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the principal portions of a deviceembodying the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

An embodiment of the present invention will now be described inconjunction with the accompanying drawing while making a comparison witha prior-art device in order to describe the present invention in greaterdetail.

FIG. 1 is a block diagram showing the principal portions of a deviceembodying the present invention, in which numeral 1 denotes a mainprocessor, 2 a bus switching circuit, 3 a main bus, 4 a main memory, 4aa diagnostic program for the main processor written into the main memory4, 5 a tape reader, 6 an NC control panel, 7a through 7n positioncontrol circuits, 8 a service processor, 9 a service processor bus, 10 aservice memory, 10a a diagnostic program for the service processorwritten into the service memory 10, 11 a control panel, and 12 a displaydevice such as a CRT.

In FIG. 1, the main processor 1 carries out data processing fornumerical control. Specifically, input data from the tape reader 5connected to the main bus 3, or data in the main memory 4, is processedin accordance with the data processing program stored in the main memory4, and the results of such processing are applied to the positioncontrol circuits 7a through 7n to execute the prescribed numericalcontrol. In addition, the diagnosis of such peripheral hardware as theNC control panel 6 connected to the main bus 3 is executed on-line andoff-line in accordance with the diagnostic program stored in the mainmemory 4. Such an arrangement as well as the operation thereof is wellknown from the prior art.

The present embodiment, as opposed to the foregoing arrangement, isprovided with the service processor 8 which is separate from the mainprocessor 1. The arrangement is such that the service processor 8, bybeing connected to the main bus 3 through the bus switching circuit 2,is capable of exercising control substantially equivalent to thatexercised by the main processor 1 with respect to the peripheralcircuitry connected to the main bus 3. Here the bus switching circuit 2is provided for the purpose of connecting the main bus 3 to the mainprocessor 1 or to the service processor 8. Connected to the serviceprocessor bus 9 of the service processor 8 are the service memory 10which stores the diagnostic program 10a executed by the serviceprocessor 8, the control panel 11 which is used during a diagnosticoperation, as well as input/output units such as the display device 12,when necessary. The present embodiment is arranged so that a stop signalSP can be fed into the main processor 1 from the outside in order tohalt the execution of its instructions. It can be arranged so that thestop signal SP enters from an error detection circuit (not shown) fordetecting an error in one of the peripheral circuits, such as thegeneration of a parity error in the main memory, or enters from theservice processor 8.

When an abnormality develops in the main processor 1 for some reasonwhich makes it impossible for the main processor to carry out systemdiagnosis, the above arrangement enables the service processor 8 toexecute diagnosis instead, so that the location of the abnormality canbe discovered in a short period of time. System diagnosis is executed bythe service processor 8 in the same manner as the conventional mainprocessor 1 after the execution of instructions by the main processorhas been halted by the stop signal SP.

Although the service processor 8 has a control capacity which issubstantially equivalent to that of the main processor 1, it is providedfor system diagnosis and not for actual numerical control, so that itsfunctions and programs need not be as sophisticated as those of the mainprocessor 1. Hence a processor of an inexpensive type will suffice. Forexample, use can be made of a microprocessor wherein a processor, ROMand RAM are constructed on a single chip. Furthermore, in a variablesoftware-type NC device wherein the software configuration is differentfor each user, it is common to attach a device referred to as anengineering panel having a built-in processor to provide a facility fordiscovering software errors following shipment. If it is so arrangedthat the service processor is this built-in processor in the numericalcontrol device of the above kind, then more effective use can be made ofthe engineering panel which conventionally merely serves as means fordebugging and for software development.

In accordance with the foregoing embodiment, system diagnosis is carriedout by the main processor 1, but the service processor 8 can be made toexecute all of the diagnostic operation. In addition, an arrangement ispossible wherein the service processor 8 may access the peripheralcircuitry such as the NC control panel 6 through a bus different fromthe main bus 3.

As described hereinabove, the present invention includes a serviceprocessor which is separate from the main processor that executes dataprocessing for numerical control, the arrangement being such that theservice processor executes system diagnosis. Thus system diagnosis ispossible even when the main processor fails, enabling the locations ofabnormalities to be discovered in a short period of time. Particularly,in accordance with the present invention, if the processor which is partof the engineering panel, which is attached to and shipped together witha variable software-type NC device, is utilized as the serviceprocessor, then the diagnostic function of the numerical control devicecan be enhanced with the addition of only a small quantity of hardware.

What is claimed is:
 1. A numerical control device having peripheralcircuitry including a main memory, a tape reader, a numerical controlpanel and position control circuits connected to a main bus, said devicecomprising:main processor means, operatively connected to the main bus,for carrying out processing for numerical control; switching circuitmeans, operatively connected to said main processor means and the mainbus, for connecting said main processor means to the main bus; serviceprocessor means, operatively connected to said main processor means andthe main bus via said switching circuit means and which is separate fromsaid main processor means, for halting the execution of instructions bysaid main processor means and for diagnosing failure of said mainprocessor means and the peripheral circuitry, said service processormeans having a numerical control processing capacity substantiallyequivalent to that of said main processor means with respect to theperipheral circuitry connected to the main bus which is connected tosaid main processor through said switching circuit means, said switchingcircuit means for connecting said service processor means to the mainbus when said main processor means fails; a service processor busoperatively connected to said service processor means; and a servicememory, a control panel and a display device operatively connected tosaid service processor bus.
 2. A numerical control device according toclaim 1, wherein said service processor means is a processor within anengineering debugging panel for the numerical control device.
 3. Anumerical control system, comprising:a main processor for numericalcontrol processing; a switching circuit operatively connected to saidmain processor; peripheral circuits operatively connected to saidswitching circuit and including numerical control circuits and adiagnostic program memory including a first system diagnostic programexecutable by said main processor; a service processor memory includinga second system diagnostic program; and a service processor, operativelyconnected to said switching circuit and said service processor memory,for diagnosing failure of said main processor and said peripheralcircuits when said main processor fails in accordance with the seconddiagnostic program, said switching circuit connecting said serviceprocessor to said peripheral circuits when said main processor fails.